// 
//
//
//
//
//
//
//
//
//
import java.util.Scanner;

public class wages
{
   public static void main(String[] args)
   {
      final double MIN = 8.50;
      final double STD = 20;

      Scanner input = new Scanner(System.in);      
      
      System.out.println("How many hours have you worked? ");
      int totalHrs = input.nextInt();
      
      if(totalHrs <= 20)
         System.out.println("Your wage should be : $" + (totalHrs*MIN));
      else
         System.out.println("Your wage should be : $" + (STD*MIN + (totalHrs-STD)*MIN*1.5));
   }
}